package com.iplant.basic.serviceImpl.dao.crm;

import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.basic.service.po.crm.CRMCustomer;
import com.iplant.base.po.OutResult;
import com.iplant.base.po.Pagination;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.*;

@DBBaseDAO(CRMCustomer.class)
public class CRMCustomerDAO extends BaseDAO {

    private static CRMCustomerDAO Instance = null;
    private static Logger logger = LoggerFactory.getLogger(CRMCustomerDAO.class);

    private CRMCustomerDAO() {
        super("");
    }

    public static CRMCustomerDAO getInstance() {
        if (Instance == null){
            Instance = new CRMCustomerDAO();
            Instance.Init();
        }
        return Instance;
    }




    public List<CRMCustomer> CRM_QueryCustomerList(BMSEmployee wLoginUser, String wTaxCode,
                                                   String wName, String wIndustry, String wCountry, String wProvince,
                                                   String wCity, int wGrade, int wTypeID,
                                                   int wActive, Pagination wPagination, OutResult<Integer> wErrorCode) {


        Map<String, Object> wParams=new HashMap<>();
        wParams.put("TaxCode", wTaxCode);
        wParams.put("Name", wName);
        wParams.put("Industry", wIndustry);
        wParams.put("Country", wCountry);
        wParams.put("Province", wProvince);
        wParams.put("City", wCity);
        wParams.put("Grade", wGrade);
        wParams.put("TypeID", wTypeID);
        wParams.put("Active", wActive);

        return this.SelectPOList(wLoginUser, wParams, wPagination, wErrorCode);
    }






} 